GXFormatDialog
You can use theGXFormatDialog
function to display the Custom Page Setup dialog box when the user chooses the Custom Page Setup menu item from the File menu.
gxDialogResult GXFormatDialog (gxFormat aFormat, gxEditMenuRecord *anEditMenuRecord, StringPtr title);
aFormat
- A reference to the format object that specifies the values to display in the dialog box.
title
- The title of the dialog box.
anEditMenuRecord
- A structure for your application's Edit menu and its menu items.
- function result
- The user's response to the dialog box.
DESCRIPTION
After you use theGXFormatDialog
function to display the Custom Page Setup dialog box, the user can specify formatting information for a format (which is not the default format). For example, the user can specify the paper size, orientation, and the default formatting printer.In the
anEditMenuRecord
parameter you to specify an Edit menu structure to support the standard editing operations of cut, copy, paste, and clear in dialog boxes.The
GXFormatDialog
function returns a response that is defined in a dialog box result enumeration. If the user chooses the Format button, theGXFormatDialog
function returns gxOKSelected. If the user chooses the Cancel button, the function returns gxCancelSelected. If the user chooses the Remove button, the function returns gxRevertSelected.If an error occurs, the function returns gxCancelSelected. Call the
GXGetJobError
function to determine which error occurred.This function causes QuickDraw GX to send the gxFormatDialog message, which you can override to customize the Custom Page Setup dialog box.
Note that QuickDraw GX stores a user's responses to some dialog box items in the Custom Page Setup dialog box in a format collection.
SEE ALSO
Listing 3-9 on page 3-42 shows how to use theGXFormatDialog
function to display the Custom Page Setup dialog box.The Edit menu structure and the dialog box result enumeration are described in the chapter "Core Printing Features" in this book.
For information about customizing the Custom Page Setup dialog box, see "Adding Panels to Dialog Boxes" beginning on page 3-67.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help